﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace FYPDemo
{
    public partial class Advertisement_Maintenance : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DataTable dt = BackOffice_Maintenance.listAdvertisement(1);

                Advertisement_Grid.DataSource = dt;
                Advertisement_Grid.DataBind();
            }
        }

        protected void btnSearch_Click(object sender, EventArgs e)
        {
            int status = Convert.ToInt32(ddlStatus.SelectedValue);

            DataTable dt = BackOffice_Maintenance.listAdvertisement(status);

            Advertisement_Grid.DataSource = dt;
            Advertisement_Grid.DataBind();
        }

        protected void btnGO_Click(object sender, EventArgs e)
        {
            Response.Redirect("Advertisement_Maintenance3.aspx");
        }


    }
}